package com.zhangyu.shadow.repair.delegate.maintain;

import com.alibaba.fastjson.JSON;

/**
 * Description:
 *
 * @author Hequn.Lee
 * @date 2018/11/17
 */
public class PostJsonReportData {

    private final PostReportData modelMaintenance;
    private final PostReportData modelRepair;
    private final String appId;
    private final String authKey;
    private final String workCode;
    private final String sourceType;
    private final int vmAction;

    public PostJsonReportData(PostReportData modelMaintenance,
                              PostReportData modelRepair,
                              String appId,
                              String authKey,
                              String workCode,
                              String sourceType,
                              int vmAction) {
        this.modelMaintenance = modelMaintenance;
        this.modelRepair = modelRepair;
        this.appId = appId;
        this.authKey = authKey;
        this.workCode = workCode;
        this.sourceType = sourceType;
        this.vmAction = vmAction;
    }

    public static String getJsonData(PostReportData modelMaintenance,
                                     PostReportData modelRepair,
                                     String appId,
                                     String authKey,
                                     String workCode,
                                     String sourceType,
                                     int vmAction) {
        return JSON.toJSONString(new PostJsonReportData(modelMaintenance, modelRepair,
                appId, authKey, workCode, sourceType, vmAction));
    }

    public PostReportData getModelMaintenance() {
        return modelMaintenance;
    }

    public PostReportData getModelRepair() {
        return modelRepair;
    }

    public String getAppId() {
        return appId;
    }

    public String getAuthKey() {
        return authKey;
    }

    public String getWorkCode() {
        return workCode;
    }

    public String getSourceType() {
        return sourceType;
    }

    public int getVmAction() {
        return vmAction;
    }
}
